<template>
  <div v-loading="loading" :style="'height:' + height">
    <iframe
      id="druid"
      :src="src"
      frameborder="no"
      style="width: 100%; height: 100%"
      scrolling="auto"
    />
  </div>
</template>
<script>
export default {
  name: "Druid",
  data() {
    return {
      src: "https://littlejiang.top:8989/druid/index.html",
      // src: "http://localhost:8989/druid/index.html",
      height: document.documentElement.clientHeight - 120 + "px;",
      loading: true,
    };
  },
  mounted: function () {
    setTimeout(() => {
      this.loading = false;
    }, 230);
    const that = this;
    window.onresize = function temp() {
      that.height = document.documentElement.clientHeight - 120 + "px;";
    };
    window.druid.onload = () => {
      window.druid.contentWindow.document.getElementsByTagName(
        "footer"
      )[0].style.display = "none";
    };
  },
};
</script>

<style></style>
